package operation.impl;

import book.BookList;
import operation.IOperation;

public class FindOperation implements IOperation {
    @Override
    public void work(BookList bookList) {
        System.out.println("请输入要查询的书籍名称:");
        String bookName = scanner.next();
        if (bookList.isContains(bookName)) {
            System.out.println("查询成功,该书信息如下:");
            bookList.searchBook(bookName);
        }else {
            System.err.println("图书馆不存在该书籍!");
        }
    }
}
